package com.itheima.member;

import com.hzheima.util.ImageUtil;
import com.itheima.ExtendsClass.Fly;
import com.itheima.FinalCanstans;

public class Picture2 extends Fly {
    private  double yspeed;
    public Picture2() {
        //插入背景图片
        img = ImageUtil.getImg("gk4.png");
        //确定背景图原点的位置
        x = 0;
        y = -200;
        width = FinalCanstans.APP_WIDTH;
        hight = 800;
        yspeed = 0.01;
    }

    //创建一个移动方法
    public void movePicture2() {
        y += yspeed;
        if (y == 0) {
            y = -200;
        }
    }
}
